package cn.com.cloud.io.controller;

import cn.com.cloud.io.service.FeignUserService;
import cn.com.cloud.io.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignUserController {

    @Autowired
    private FeignUserService userService;

    @RequestMapping(value = "/api/provider/register",method = RequestMethod.POST)
    public ResponseEntity<Object> register(@RequestBody UserVo user) {
        userService.register(user);
        return new ResponseEntity<Object>("ok", HttpStatus.OK);
    }
}
